package cn.gmcx.lazy.izze.mapper;

import cn.gmcx.lazy.izze.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author GMCX
 * @since 2024-06-14
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    void add(User user);

    void update1(User user);

    @Select("select * from user")
    List<User> selectAll();

    @Select("select * from user where id=#{id}")
    User selectById(Integer id);

    @Select("select * from user where username = #{username} and password = #{password}")
    User select_user(User user);

    @Select("select praise from video where user_id = #{id}")
    List<Integer> selectParise(Integer id);

    @Select("select * from user where id=#{id}")
    User selectId(String id);

}
